export default function getParams(name) {
  let href = window.location.href;
  href = href.substring(href.indexOf('?') + 1);
  const reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
  const r = href.match(reg);
  let strValue = "";
  if (r != null) {
    strValue = unescape(r[2]);
  }
  return strValue;
}
